"use strict";
// 定义变量  let 变量名:数据类型 = 值
var username = 'lili';
username = 'zs';
var num = 1;
num = 1.0;
num = 0.122;
var num1 = 1;
var isLogin = true;
var value = null;
var test = undefined;
//推断数据的类型
// let param = 1;
// param = 'world';
//联合类型
var param = 1;
param = '123';
//any
// let param1:any = '123';
// param1 = undefined;
//数组的定义
var arr1 = ['a', 'b', 'c'];
var arr2 = [1, 2, 3];
//元组
var t1 = ['sds', 1, true];
console.log(t1[2]);
//枚举  常量
var Sex;
(function (Sex) {
    Sex[Sex["girl"] = 1] = "girl";
    Sex[Sex["boy"] = 2] = "boy";
    Sex[Sex["unkown"] = 3] = "unkown";
})(Sex || (Sex = {}));
var Color;
(function (Color) {
    Color["write"] = "#fff";
    Color["black"] = "#000";
})(Color || (Color = {}));
var Week;
(function (Week) {
    Week[Week["Monday"] = 0] = "Monday";
    Week[Week["Tuesday"] = 1] = "Tuesday";
    Week[Week["Wednesday"] = 2] = "Wednesday";
    Week[Week["Thursday"] = 3] = "Thursday";
    Week[Week["Friday"] = 4] = "Friday";
    Week[Week["Saturday"] = 5] = "Saturday";
    Week[Week["Sunday"] = 6] = "Sunday";
})(Week || (Week = {}));
console.log("----", Week);
function getInfo(param) {
    if (typeof param === 'string') {
        return "\u6211\u53EB\uFF1A" + param;
    }
    else if (typeof param == 'number') {
        return "\u6211" + param + "\u5C81";
    }
    else {
        return '输入错误';
    }
}
console.log(getInfo('lili'));
console.log(getInfo(18));
